package com.booksystem.campuslibrarymanagementsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.booksystem.campuslibrarymanagementsystem.entity.CategoriesTable;
import com.booksystem.campuslibrarymanagementsystem.mapper.CategoriesTableMapper;
import com.booksystem.campuslibrarymanagementsystem.service.CategoriesTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CategoriesTableServiceImpl extends ServiceImpl<CategoriesTableMapper, CategoriesTable>implements CategoriesTableService {
    @Autowired
    CategoriesTableMapper categoriesTableMapper;

    @Override
    public CategoriesTable queryByCategoryName(String categoryname) {
        return categoriesTableMapper.queryByCategoryName(categoryname);
    }

    @Override
    public boolean upDataName(int categoryid, String categoryname) {
        return categoriesTableMapper.upDataName(categoryid,categoryname);
    }

    @Override
    public CategoriesTable queryByCategoryId(int categoryid) {
        return categoriesTableMapper.queryByCategoryId(categoryid);
    }

    @Override
    public boolean deleteByIds(int categoryid) {
        return categoriesTableMapper.deleteByIds(categoryid);
    }

    @Override
    public CategoriesTable selectLastCategoryid() {
        return categoriesTableMapper.selectLastCategoryid();
    }


}
